JavaScript

buttonList.populate Method

Syntax

buttonListObj.populate(buttons)

Arguments

buttonsJSON array

An array of JSON objects that define the buttons to add. The object defining the button has the following properties:

valueany

The value of the button.

hideboolean

If true then the button will not appear in the list. The default is false.

disabledboolean

If true then the button will not appear in the list. The default is false.

htmlstring

The HTML to put in the button.

iconstring

The icon to put in the button. See A5.u.icon.

hoverIconstring

The icon to put in the button when the user hovers over it. See A5.u.icon.

pressedIconstring

The icon to put in the button when it is pressed. See A5.u.icon.

disabledIconstring

The icon to put in the button when it is disabled. See A5.u.icon.

disabledSelectedIconstring

The icon to put in the button when it is disabled and selected. See A5.u.icon.

classNamestring

One or more class names to apply to the button.

tipstring

The TITLE attribute to put in the button that will appear as a tool tip when the user hovers over the button.

Description

Populates a Button List Control.

Example

var buttonListObj = {dialog.object}.getControl('BUTTONLIST_1');

if (buttonListObj) {
    var buttons = [
        {html: 'New Button 1', value: 'nb1', tip: 'Help for new button 1'},
        {html: 'New Button 2', value: 'nb2', tip: 'Help for new button 2'},
    ];

    buttonListObj.populate(buttons);
}